package router

import (
	"github.com/gin-gonic/gin"
	"onerk4/zk1/api/handler"
	"onerk4/zk1/pkg"
)

func LoadRouter(r *gin.Engine) {
	user := r.Group("/user")
	{
		user.POST("/login", handler.UserLogin)
		user.POST("/send/sms", handler.SendSms)
	}

	product := r.Group("/product")
	{
		product.GET("/list", handler.ProductList)
	}

	order := r.Group("/order")
	{
		order.Use(pkg.JWTAuth("2209a"))
		order.GET("/list", handler.OrderList)
	}
}
